<%@ Page Language="C#" EnableViewState="false" ValidateRequest="false" AutoEventWireup="true" 
	MasterPageFile="~/App_ThemeMasters/NoStyle/OneColumnLayout.Master" Inherits="Syrinx.Gui.AspNet.Ajax.NitobiBasePage" EnableEventValidation="false" %>

<%@ Register Assembly="Swaf.Gui.AspNet2" Namespace="Swaf.Gui.AspNet2" TagPrefix="swf" %>
<%@ Register Assembly="ScsAspNet" Namespace="Syrinx.Gui.AspNet.Ajax" TagPrefix="saj" %><%@ Register Assembly="NitobiControls" Namespace="Nitobi" TagPrefix="ntb" %>
<%@ Register Assembly="ScsAspNet" Namespace="Articles.Gui.AspNet" TagPrefix="art" %>

<!--#include file="~/SiteControls/RegisterStandardControls.txt"-->
<!--#include file="../SiteControls/StandardHeaderPageContent.inc"-->
<!--#include file="../SiteControls/StandardFooterPageContent.inc"-->

<script runat="server">
	public bool PreloadFreeTextBox = false;
    public string TitleFormat = "$glgo.title$ - $gArt1.title$";
</script>

<asp:Content ID="c1" ContentPlaceHolderID="title" runat="server">
	<swf:BizProc runat="server" ID="gArt1" factoryName="genericArticles">
		<State includeSelf="true" entireTree="true" EditModeSessionKey="GlobalEdit" />
		<ParentBizProc id="loginBP"  />
	</swf:BizProc>
	<swf:BizProc runat="server" id="t" FactoryName="articleTrail">
		<ParentBizProc id="gArt1" fieldName="parentId" dataId="pid" />
	</swf:BizProc>
	<swf:BizProc ID="attachGroup" runat="server" FactoryName="articleAttachmentGroups">
		<ParentBizProc id="gArt1" fieldName="id" dataId="pid" />
		<State includeFiles="true" />
	</swf:BizProc>
	<swf:BizProc runat="server" ID="gArtSiblings" factoryName="genericArticles">
		<State includeSelf="false" entireTree="false" EditModeSessionKey="GlobalEdit" resetDepth="true" />
	</swf:BizProc>
	<swf:BizProc runat="server" ID="gArtSibTitle" factoryName="genericArticles">
		<State includeSelf="true" entireTree="false" EditModeSessionKey="GlobalEdit" resetDepth="true" maxElements="1" />
		<ParentBizProc id="gArtSiblings" fieldName="parentId" dataId="pid" />
	</swf:BizProc>

	<swf:BizProc runat="server" ID="gca1" factoryName="Forums">
		<State includeSelf="false" entireTree="true" includeCounts="true" useAssociationName="Reader Comments" 
			EditModeSessionKey="ForumEdit" incrementCounts="false" listDetailLevel="fullDetails" orderBy="(CASE WHEN [publishDate] IS NULL THEN nc.dateCreated ELSE [publishDate] END)" />
		<ParentBizProc id="gArt1" fieldName="id" dataId="pid" />
		<ParentBizProc id="gArt1" dataId="associated" />
	</swf:BizProc>
	<swf:BizProc runat="server" ID="captcha" FactoryName="captchaVerify">
		<ParentBizProc id="loginBP" />
		<ParentBizProc id="gca1" dataId="pid" />
		<State usage="canedit" />
	</swf:BizProc>
</asp:Content>

<asp:Content ID="c2" ContentPlaceHolderID="trails" runat="server">
<div class="px11">
		<saj:ComplexBizObjListDisplay runat="server" ID="ArticleParentTrail1" 
			ParentBizProcIds="t" 
			ReadOnlyTemplate="Articles.Gui.AspNet.ArticleParentTrail-Simple">
			<macros partTitle="$title$" navLink="$Cascade($readMoreJump$,$CmpSetting(sitePath)$/articles/$CalcArticleIds($pid$,$uniqueId$)$.aspx)$" />
		</saj:ComplexBizObjListDisplay>
</div>
		<div class="clearer"></div>
	    <br style="line-height:5px" />
		<div  >
			<span class="button4"><saj:ActionButton runat="server" ID="_b1" Actions="gArt1.SwitchEdit" Text="Edit" SessionBoolSwitch="GlobalEdit"  /></span>
			<span class="button1"><saj:ActionButton runat="server" ID="_b2" Actions="gArt1.SwitchTranslation" Text="Translate" SessionBoolSwitch="TranslationMode" /></span>
			<span class="button1"><saj:ActionButton runat="server" ID="_b3" Actions="gArt1.TranslateArticle" Text="Auto Translate" /></span>
			<span class="button1"><saj:ActionButton runat="server" ID="_b4" Actions="gArt1.AddBizObj" Text="Add" /></span>
			<span class="button6"><saj:ActionButton runat="server" ID="_b5" Actions="gArt1.UpdateBizObj" Text="Update" /></span>
			<span class="button1"><saj:ActionButton runat="server" ID="_b6" Actions="gArt1.CancelEdits" Text="Cancel" /></span>
			<span class="button5"><saj:ActionButton runat="server" ID="_b7" Actions="gArt1.DeleteBizObj" Text="Delete" ClientClick="if(!confirm('Are you sure you want to delete?'))return false;"/></span>
			<span class="button1"><saj:ActionButton runat="server" ID="_b8" Actions="gArt1.SetArticlePicture" Text="Set Image" ToolTip="Set primary media for this article" 
				PopupPage="../popups/SetArticleImagePopup.aspx" PopupHeight="535px" PopupWidth="800px" PopupTitle="Select a primary image for this article." /></span>
			<span class="button1"><saj:ActionButton runat="server" ID="_b9" Actions="gArt1.GenerateFromMedia" Text="Generate" ToolTip="Generate child article from media derictory"
				PopupPage="../popups/AddArticleChildImagesPopup.aspx" PopupHeight="535px" PopupWidth="800px" PopupTitle="Add Children from Selected Media."/></span>
			<span class="button1"><saj:ActionButton runat="server" ID="_b10" Actions="gArt1.GenerateFromYouTube" Text="uTubeGen" ToolTip="Generate child article from You Tube Account"
				PopupPage="../popups/PopupYouTubeGenPopup.aspx" PopupHeight="535px" PopupWidth="800px" PopupTitle="Generate articles from You Tube Account." /></span>
			<span class="button3"><saj:ActionButton runat="server" ID="_b11" Actions="gArt1.MovePrev" Text="Previous" /></span>
			<span class="button3"><saj:ActionButton runat="server" ID="_b12" Actions="gArt1.MoveNext" Text="Next" /></span>
			<swf:ActionButton Visible="false" runat="server" ID="_sgnup" Actions="orderBP.UpdateBizObj,membership.AddOne(FreeForumUserMembership),checkout.StartWizard,checkout.MoveNext" Text="Sign up Now" />
		</div>
<div class="clearer"></div>
</asp:Content>

<asp:Content ID="c3" ContentPlaceHolderID="mainContent" runat="server">
	<div class="StandardArticleBox">
		<art:ArticleTranslationDisplay runat="server" ID="gad1"
			ParentBizProcIds="gArt1" 
			TranslationTemplate="Articles.Gui.AspNet.ArticleTranslationRWDisplay"
			ReadOnlyTemplate="Articles.Gui.AspNet.ArticleRODisplay$suggestedDisplayType$"
			EditableTemplate="Articles.Gui.AspNet.ArticleRWDisplay$suggestedDisplayType$" >
			<macros imageRes="Medium" />
		</art:ArticleTranslationDisplay>
	</div>
    <saj:ActionButton runat="server" ID="ActionButton13" Actions="gArt1.UpdateArtForm" Text="Submit" TriggerParam="javascript:getArtFormData($ntb('ctl00_mainContent_gad1_body'))" />
    	
	<art:FileAttachmentGroupsListDisplay runat="server" ID="fat" ParentBizProcIds="attachGroup"
	CssClass="FileAttachOuterBox"
	ReadOnlyTemplate="Articles.Gui.AspNet.FileAttachmentGroupsListDisplay-Style1"/>
	
	 <a name="UserComments">&nbsp;</a> 
	<span class="button1"><saj:ActionButton runat="server" ID="ActionButton14" Actions="gca1.AddBizObj" Text="Add Comment" /></span>
	<span class="button6"><saj:ActionButton runat="server" ID="ActionButton15" Actions="captcha.VerifyUser,gca1.UpdateBizObj" Text="Update" /></span>
	<span class="button1"><saj:ActionButton runat="server" ID="ActionButton16" Actions="gca1.CancelEdits" Text="Cancel" /></span>
	<span class="button5"><saj:ActionButton runat="server" ID="ActionButton17" Actions="gca1.DeleteBizObj" Text="Delete" ClientClick="if(!confirm('Are you sure you want to delete?'))return false;"/></span>
	<span class="button4"><saj:ActionButton runat="server" ID="_pst6" Actions="gca1.SwitchEdit" Text="Edit" SessionBoolSwitch="ForumEdit"  /></span>
	<saj:NitobiBizObjDisplay runat="server" ID="cap1" ParentBizProcIds="captcha"
		ReadOnlyTemplate=""
		EditableTemplate="Syrinx.Gui.AspNet.CaptchaDisplay" />
	<saj:NitobiBizObjDisplay ID="rcd" runat="server"
		ParentBizProcIds="gca1"
		ReadOnlyTemplate=""
		EditableTemplate="Articles.Gui.AspNet.ArticleRWDisplay-SimpleEditor-ReaderComment" />
		<div class="clearer"></div>
	<saj:ComplexBizObjListDisplay ID="ComplexBizObjListDisplay1" MaxElements="20" runat="server" 
		ParentBizProcIds="gca1"
		ReadOnlyTemplate="Blog.Gui.AspNet.BlogCommentList-TitlePubDateBody" >
		<macros
		navLink="javascript:if(document.getElementById('ctl00_mainContent_rcd_baseTitle') == null)window.location.href='$CmpSetting(sitePath)$/articles/$CalcArticleIds($pid$,$uniqueId$)$.aspx';else $_bizProcId$BizProc.triggerEvent('$_controlId$','bizObjSelected','$id$');" />
	</saj:ComplexBizObjListDisplay>
</asp:Content>

<asp:Content ID="c4" ContentPlaceHolderID="sideMain1" runat="server">
    <div class="SideArticleList">
	    <saj:NitobiBizObjDisplay ID="groupTitle" runat="server"
		    ParentBizProcIds="gArtSibTitle"
		    EditableTemplate="Articles.Gui.AspNet.ArticleRODisplay-TitleOnly" />

	    <saj:ComplexBizObjListDisplay ID="relatedArticles" runat="server" CssClass="RelatedArticles"
		    ReadOnlyTemplate="Articles.Gui.AspNet.ArticleListDisplay-TextOnlyTree"
		    ParentBizProcIds="gArtSiblings">
			    <macros navLink="javascript:gArt1BizProc.triggerEvent('gArt1','selectBizObj','$id$');" />
	    </saj:ComplexBizObjListDisplay>	
    </div>
</asp:Content>